feat: add api.fs.copy.basename, default mapping ge#2698
Merged
alex-courtis merged 6 commits intonvim-tree:masterfrom Mar 14, 2024
itsramiel:feat/add-copy-basename
Merged
feat: add api.fs.copy.basename, default mapping ge#2698alex-courtis merged 6 commits intonvim-tree:masterfrom itsramiel:feat/add-copy-basename
alex-courtis merged 6 commits intonvim-tree:masterfrom
itsramiel:feat/add-copy-basename
Conversation
alex-courtis
requested changes
Mar 9, 2024
Member
alex-courtis
left a comment
There was a problem hiding this comment.
That will be really handy. Works as expected.
We do need to change the mapping:
- users expect
lto act as per default vim behaviour
Member
|
Our copy mappings aren't great: I'm using Unfortunately we can't change the defaults. |
Collaborator
Author
Nice mappings. I think I'll use them. |
alex-courtis
requested changes
Mar 10, 2024
Member
alex-courtis
left a comment
There was a problem hiding this comment.
Working, just needs style and help fixes.
First time contributors don't get automated CI ;)
Collaborator
Author
|
I believe it is ready |
alex-courtis
approved these changes
Mar 14, 2024
Member
alex-courtis
left a comment
There was a problem hiding this comment.
Many thanks for all your work!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there 👋
I would like to propose a new keymap, which is copying basename of a file. I believe in most OOP and functional programming language it is very common to create a file for a class/function and name the file and the class/function the same, so the process goes like creating a
somelongNameThatIDontWantToTypeAgain.jsfile and then wanting to create a function with the same name. Currently I useyand then manually delete the extension. I personally dont think I have ever used theyas it is and only to copy and then delete the extension.I hope you can see the value in having such a keymap. The mapping
lwas random. I just used what is still available and can change it to whatever you like.Hope you find it useful too. I think it'll impact lots of users.